<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        function Point(x = 0, y = 0) {
            this.x = x;
            this.y = y;
        }

        const p = new Point();
        console.log(p);
        p // { x: 0, y: 0 }
    </script>
</body>

</html>